﻿using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Text;
using System;

namespace Models
{
    public class UnmanContexts : DbContext
    {
        /// <summary>
        /// 数据上下文
        /// </summary>
        /// <param name="options"></param>
        public UnmanContexts(DbContextOptions<UnmanContexts> options) : base(options)
        {

        }
        //EF的迁移
        //①启用迁移：Enable-Migrations
        //②构建迁移：Add-Migration <名称>  注意：执行完该命令必须执行一次Update-DataBase
        //③更新到数据库：Update-DataBase

        public virtual DbSet<StaffInfo> StaffInfo { get; set; } //商店员工表
        public virtual DbSet<MenuInfo> MenuInfo { get; set; } //菜单表
        public virtual DbSet<RoleInfo> RoleInfo { get; set; } //角色表表
        public virtual DbSet<Employee_RoleInfo> Employee_RoleInfo { get; set; } //员工角色表
        public virtual DbSet<DepartmentInfo> DepartmentInfo { get; set; } //部门表
        public virtual DbSet<R_RoleInfo_MenuInfo> R_RoleInfo_MenuInfo { get; set; } //角色权限表表
        public virtual DbSet<CommodityInfo> CommodityInfo { get; set; } //商店商品信息表
        public virtual DbSet<ProductType> ProductType { get; set; } //商品类别表
        public virtual DbSet<FileInfo> FileInfo { get; set; } //文件信息表表
        public virtual DbSet<ProductRecord> ProductRecord { get; set; } //商品记录表表
        public virtual DbSet<UserBalanceInfo> UserBalanceInfo { get; set; } //用户余额表
        public virtual DbSet<BalanceRecord> BalanceRecord { get; set; } //消费记录表
        public virtual DbSet<UserInfo> UserInfo { get; set; } //用户表表
        public virtual DbSet<OrderInfo> OrderInfo { get; set; } //订单表
        public virtual DbSet<OrderDetaIls> OrderDetaIls { get; set; } //订单详情表

    }
}
